package cn.jsj.hzu.qm.facecloud.ciuser.pojo;

import java.util.Objects;
/**
 * 
 * 动态签到文本的实体类
 * 
 * 
 * */
public class Citext implements Comparable<Citext>{
	private int id;
	private String text;
	private String who;
	private int level;
	private String edittime;
	private int labid;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getWho() {
		return who;
	}

	public void setWho(String who) {
		this.who = who;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public String getEdittime() {
		return edittime;
	}

	public void setEdittime(String edittime) {
		this.edittime = edittime;
	}

	public int getLabid() {
		return labid;
	}

	public void setLabid(int labid) {
		this.labid = labid;
	}

	@Override
	public int hashCode() {
		return Objects.hash(edittime, id, labid, level, text, who);
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Citext other = (Citext) obj;
		return Objects.equals(edittime, other.edittime) && id == other.id && labid == other.labid
				&& level == other.level && Objects.equals(text, other.text) && Objects.equals(who, other.who);
	}

	@Override
	public String toString() {
		return "Citext [id=" + id + ", text=" + text + ", who=" + who + ", level=" + level + ", edittime=" + edittime
				+ ", labid=" + labid + "]";
	}
	
	public String toJsonString() {
		return "{id:'" + id + "', text:'" + text + "', who:'" + who + "', level:'" + level + "', edittime:'" + edittime
				+ "', labid:'" + labid + "'}";
	}

	public Citext(int id, String text, String who, int level, String edittime, int labid) {
		super();
		this.id = id;
		this.text = text;
		this.who = who;
		this.level = level;
		this.edittime = edittime;
		this.labid = labid;
	}

	public Citext() {
		super();
	}

	@Override
	public int compareTo(Citext o) {
		return o.getLevel() - this.level;
	}

}
